﻿// <copyright file="VectorExtentions.cs" company="Ucaya">
// </copyright>
// <author>Ucaya</author>

namespace KinectExtensions
{
    #region

    using Microsoft.Research.Kinect.Nui;

    #endregion

    /// <summary>
    ///   TODO: Update summary.
    /// </summary>
    public static class VectorExtentions
    {
        #region Public Methods

        public static float SquaredXYSize(this Vector vector, Vector referencePoint)
        {
            float dx = vector.X - referencePoint.X;
            float dy = vector.Y - referencePoint.Y;
            return dx * dx + dy * dy;
        }

        public static float SquaredZ(this Vector vector, Vector referencePoint)
        {
            float dz = vector.Z - referencePoint.Z;
            return dz * dz;
        }

        #endregion
    }
}